package com.firewolf.fr.utils;

import java.io.IOException;

import org.apache.solr.client.solrj.impl.HttpSolrClient;

public class SolrUtil {

	/**
	 * 获取服务连接
	 * 
	 * @param url
	 * @return
	 */
	public static HttpSolrClient getServer(String url) {
		HttpSolrClient client = new HttpSolrClient(url);
		return client;
	}

	/**
	 * 关闭服务
	 * 
	 * @param client
	 */
	public static void close(HttpSolrClient client) {
		try {
			client.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
